package com.qst.service.impl;

import com.qst.dao.ScheduleMapper;
import com.qst.po.Schedule;
import com.qst.service.IScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ScheduleServiceImpl implements IScheduleService {
    @Autowired
    private ScheduleMapper scheduleMapper;
    @Override
    public int getTotalCount() {
        return scheduleMapper.getTotalCount();
    }

    @Override
    public List<Schedule> getschedulesbypage(int page, int limit) {
        return scheduleMapper.getschedulesbypage((page-1)*limit,limit);
    }

    @Override
    public int addschedule(Schedule schedule) {
        return scheduleMapper.addschedule(schedule);
    }

    @Override
    public Schedule getschedulesbyid(int id) {
        return scheduleMapper.getschedulesbyid(id);
    }

    @Override
    public int updateschedule(Schedule schedule) {
        return scheduleMapper.updateschedule(schedule);
    }

    @Override
    public int deleteschedule(int id) {
        return scheduleMapper.deleteschedule(id);
    }
}
